@extends('admin/index')
@section('name')
    <h1><span class="label label-default"> 后台用户添加  </span></h1>
    <hr>

    <div class="container">
        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                <form class="form-horizontal" action="{{url('/admin/insert')}}" method="post"  enctype="multipart/form-data">
                    {{  csrf_field() }}

                    <div class="form-group">
                        <label for="inputPassword3" class="col-sm-2 control-label">昵称</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" name="a_name" placeholder="昵称">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="inputPassword3" class="col-sm-2 control-label">密码</label>
                        <div class="col-sm-10">
                            <input type="password" class="form-control" name="a_pass" placeholder="密码">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-2 control-label">邮箱</label>
                        <div class="col-sm-10">
                            <input type="email" class="form-control" name="a_email" placeholder="邮箱">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="inputPassword3" class="col-sm-2 control-label">类型</label>
                        <div class="col-sm-10">
                            <label class="radio-inline">
                                <input type="radio" name="a_type"  value="0"> 普通管理员
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="a_type"  value="1"> 超级管理员
                            </label>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="inputPassword3" class="col-sm-2 control-label">角色</label>
                        <div class="col-sm-10">
                            @foreach($list as $v)
                                @if($v->start == 1)
                                <label class="checkbox-inline">
                                    <input type="checkbox" name="or_name[]" value="{{$v->id}}">{{$v->or_name}}
                                </label>
                                @endif
                            @endforeach
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="submit" class="btn btn-default">Addition</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

@endsection

